<!DOCTYPE html>
<html lang="{{ lang }}">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{{ keyword }} - {{ i18n(key='navigation_search') }} - {{ site_info.name }}</title>
    <link rel="shortcut icon" href="{{ url_for('static', path='favicon.ico') }}" type="image/x-icon">
    <meta name="keywords" content="{{ site_info.keyword }}" />
    <meta name="description" content="{{ site_info.description }}" />
    <meta name="applicable-device" content="pc,mobile" />
	<link href="{{ url_for('static', path='css/bootstrap.min.css') }}" rel="stylesheet" />
	<link href="{{ url_for('static', path='css/bxslider.css') }}" rel="stylesheet" />
	<link href="{{ url_for('static', path='css/style.css') }}" rel="stylesheet" />
	<script src="{{ url_for('static', path='js/jquery.min.js') }}"></script>
	<script src="{{ url_for('static', path='js/bxslider.min.js') }}"></script>
	<script src="{{ url_for('static', path='js/common.js') }}"></script>
	<script src="{{ url_for('static', path='js/bootstrap.min.js') }}"></script>
</head>
<body>
    {% include 'layout/header.html' %}
    <div class="page_bg" style="background: url({{ url_for('static', path='images/detail_bg.jpg') }}) center top no-repeat;"></div>
    <div class="bread_bg">
        <div class="container">
            <div class="row">
                <div class="col-xs-12 col-sm-12 col-md-12">
                    <div class="bread_nav">
                        <span class="glyphicon glyphicon-home" aria-hidden="true"></span>
                        <a href="{{ url_for('index') }}">{{ i18n(key='navigation_home') }}</a> >
                        <a href="javascript:;">{{ i18n(key='navigation_search') }}</a> >
                        <a href="javascript:;">{{ keyword }}</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="container">
        <div class="row">
            <!-- left -->
            <div class="col-xs-12 col-sm-4 col-md-3">
                <h3 class="left_h3"><span>{{ i18n(key='navigation_search') }}</span></h3>
                <div class="left_column">
                    <ul class="left_nav_ul" id="firstpane">
                        <li><a href="javascript:;" class="biglink left_active">{{ i18n(key='navigation_search_result') }}</a></li>
                    </ul>
                </div>
                {% include 'layout/news_sidebar.html' %}
            </div>
            <!-- right -->
            <div class="col-xs-12 col-sm-8 col-md-9" style="float:right">
                <div class="right_head">
                    <h2><span>{{ i18n(key='navigation_search_result') }}</span></h2>
                </div>
                <div class="product_list product_list2">
                    {% for p in search_products_result %}
                    <div class="col-sm-4 col-md-4 col-mm-6 product_img">
                        <a href="{{ url_for('product', id_=p.id) }}" title="{{ p.name }}">
                            <img src="{{ url_for('upload', path='product/' + ( p.id | string ) + '.jpg') }}" alt="{{ p.name }}" class="img-thumbnail" />
                        </a>
                        <p class="product_title">
                            <a href="{{ url_for('product', id_=p.id) }}" title="{{ p.name }}">{{ p.name }}</a>
                        </p>
                    </div>
                    {% endfor %}
                    <div class="pages">
                        <ul>
                            {% if pagination.currentPage != 1 %}
                            <a href="{{ url_for('search') }}?q={{ keyword }}&page=1"  style="text-decoration: none;">
                                <li><span class="pageinfo pageinfo-link">{{ i18n(key='first_page') }}</span></li>
                            </a>
                            {% endif %}
                            {% if pagination.prevPage %}
                            <a href="{{ url_for('search') }}?q={{ keyword }}&page={{ pagination.prevPage }}" style="text-decoration: none;">
                                <li><span class="pageinfo pageinfo-link">{{ i18n(key='prev_page') }}</span></li>
                            </a>
                            {% endif %}
                            <li>
                                <span class="pageinfo">
                                    {{ i18n(key='page') }}
                                    <strong>{{ pagination.currentPage }} / {{ pagination.totalPage }}</strong>
                                    {{ i18n(key='total') }}
                                    <strong>{{ pagination.totalRows }}</strong>
                                    {{ i18n(key='records') }}
                                </span>
                            </li>
                            {% if pagination.nextPage %}
                            <a href="{{ url_for('search') }}?q={{ keyword }}&page={{ pagination.nextPage }}" style="text-decoration: none;">
                                <li><span class="pageinfo pageinfo-link">{{ i18n(key='next_page') }}</span></li>
                            </a>
                            {% endif %}
                            {% if pagination.currentPage != pagination.totalPage %}
                            <a href="{{ url_for('search') }}?q={{ keyword }}&page={{ pagination.totalPage }}" style="text-decoration: none;">
                                <li><span class="pageinfo pageinfo-link">{{ i18n(key='last_page') }}</span></li>
                            </a>
                            {% endif %}
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    {% include 'layout/footer.html' %}
</body>
</html>